package com.blb.service.impl;

import com.blb.entity.Vehicle;
import com.blb.mapper.VehicleMapper;
import com.blb.service.IVehicleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author HuaHao
 * @since 2019-11-16
 */
@Service
public class VehicleServiceImpl extends ServiceImpl<VehicleMapper, Vehicle> implements IVehicleService {

    @Resource
    private VehicleMapper vehicleMapper;

    @Override
    public List<Vehicle> findVehicle(String vehicleName, String number) {
        return vehicleMapper.findVehicle(vehicleName,number);
    }

    @Override
    public String findReamrksById(String id) {
        return vehicleMapper.findReamrksById(id);
    }

    @Override
    public void updateVehicle(Vehicle vehicle) {
        vehicleMapper.updateVehicle(vehicle);
    }

    @Override
    public List<Vehicle> findAll(String vehicleName,String  companyId, String number, int start, int length) {
        return vehicleMapper.findAll(vehicleName,companyId, number, start, length);
    }

    @Override
    public int getAllCount(String vehicleName,String  companyId, String number) {
        return vehicleMapper.getAllCount(vehicleName,companyId,number);
    }
}
